/*
 * @(#) routerTest.js
 * 版权声明 厦门畅享信息技术有限公司, 版权所有 违者必究
 *
 * <br> Copyright:  Copyright (c) 2017
 * <br> Company:厦门畅享信息技术有限公司
 * <br> @author Administrator
 * <br> 2017-11-12 21:41:43
 */
/**
 * 模态路由控制器
 */
import React from 'react'
import {Route,Switch} from 'react-router-dom'

/*自定义组件*/
import Login from './Login';
import Home from './Home/Home';
import Demo from '../../Home/Home';
import UlynlistTest from "./Home/test/UlynlistTest";
import ShowDetail from "./Home/showdetail/ShowDetail";

class RouterDispatch extends React.Component{
    /**
     * 在组件接收到新的props或者state但还没有render时被调用。在初始化时不会被调用
     * 新props的内容会在此方法执行结束后加入到this.props中
     */
    render(){
        return (
            <div>
                <Switch location={this.props.location}>
                    <Route exact path='/' component={Login}/>
                    <Route path='/index' component={Home}/>
                    <Route path='/list' component={UlynlistTest}/>
                    <Route path='/detail' component={ShowDetail}/>
                    <Route path='/demo' component={Demo}/>
                </Switch>
            </div>
        )
    }
}

export default RouterDispatch